import request from '@/utils/request'
import defaultSettings from '@/settings'

export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.authorityApp}/s/operLogInfo/search`,
  exportUrl: `${defaultSettings.ctx.authorityApp}/s/operLogInfo/search`,
  delUrl: `${defaultSettings.ctx.authorityApp}/s/operLogInfo/remove`,
}

// 查询操作日志列表
export function listOperLogInfo(query,isExport = false) {

  return request({
    url: `${defaultSettings.ctx.authorityApp}/s/operLogInfo/search`,
    method: 'get',
    params: query,
    isExport: isExport
  })
}

// 删除操作日志
export function delOperLog(data) {
  return request({
    url: `${defaultSettings.ctx.authorityApp}/s/operLogInfo/remove?ids=${data}`,
    method: 'post'
  })
}

// 清空操作日志
export function clearOperLog() {
  return request({
    url: `${defaultSettings.ctx.authorityApp}/s/operLogInfo/clean`,
    method: 'post'
  })
}

// 查看操作日志详情
export function qryDetail(id) {
  return request({
    url: `${defaultSettings.ctx.authorityApp}/s/operLogInfo/qryDetail?id=${id}`,
    method: 'get'
  })
}

